feat(mcp): let agents change thread workspaces - #8680
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
Thread transfer impact
This comment will update automatically after the next completed run. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds an agent-facing checkout workflow and changes existing handoff behavior across Git mutation, durable thread bindings, ownership arbitration, rollback, and provider-session detachment. The breadth and side effects of these production changes warrant human review. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
03d0e2b to
4453207
Compare
4453207 to
1d54579
Compare
76ccdb2 to
69afd25
Compare
There was a problem hiding this comment.
Effect service conventions review of the new WorktreeMcpService.checkout path: service tag, inline interface, make/layer, subpath namespace imports, dependency acquisition (yield* Foo.Foo), and error construction all follow the conventions. One test-organization issue noted inline.
Posted via Macroscope — Effect Service Conventions
1ed8ca4 to
d653ad1
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON, but a cloud agent failed to start.
Reviewed by Cursor Bugbot for commit d653ad1. Configure here.
0e3839f to
e7221b8
Compare
e7221b8 to
4838416
Compare
4838416 to
84f260d
Compare
|
Superseded as the active MCP proposal by #10566 in the rebuilt MCP stack, following the maintainer request to review thin service wrappers separately from service hardening. This is not a full feature-parity replacement. This discovers branch-backed refs/worktrees only. Detached unbound inventory and switching an existing checkout require a shared service operation and are intentionally not rebuilt inside MCP. The old workspace work is retained for that extraction. Closing this mixed proposal without merging. The remote branch |

Agents need a safe way to move an existing thread to a branch, project root, existing checkout, or new worktree while keeping durable thread metadata aligned with actual Git state.
This dependent layer adds
t3_thread_checkoutover the existing VCS, V2 command, provider-session, and continuation workflows. It verifies requested refs, canonical repository/worktree identity, dirty state, active and shared ownership, and the final checked-out state before committing the binding. Physical workspace admission covers aliases and nested project roots. New-worktree handoff rechecks ownership after creation and retains any checkout whose cleanup ownership becomes uncertain.Pre-mutation reads remain cancellable. Once mutation starts, the narrow Git/binding/rollback section preserves atomicity and truthful partial-failure outcomes. A successful move ends the current provider turn;
continuationPromptschedules the replacement turn in the selected workspace. Status broadcasting is refreshed after committed changes without allowing refresh failure to rewrite the completed result.Focused validation:
vp run --filter t3 typecheckvp run --filter @t3tools/contracts typecheckvp run --filter @t3tools/shared typecheckvp run --filter @t3tools/client-runtime typecheckvp lint,vp fmt --check, andgit diff --checkDepends on #8685 for canonical bounded workspace discovery. Native stack: #8685 → #8680, rooted on
t3code/codex-turn-mappingat415ed0f73b97f1655b6282492f81d0b2bba3a9cc.Implemented by GPT-5.6-Sol via Codex in T3 Code.